﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;

namespace ERP.ERPModels.OrderManage
{
    /// <summary>
    /// 销售订单主表实体类
    /// </summary>
    public class SaleOrder : Entity<int>
    {
        /// <summary>
        /// 订单主题/标题
        /// </summary>
        public string? Subject { get; set; }

        /// <summary>
        /// 订单编码（唯一键，不可为空）
        /// </summary>
        public string OrderCode { get; set; } = null!;

        /// <summary>
        /// 订单名称
        /// </summary>
        public string? OrderName { get; set; }

        /// <summary>
        /// 客户编码
        /// </summary>
        public string? CustomerCode { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        public string? CustomerName { get; set; }

        /// <summary>
        /// 客户ID号
        /// </summary>
        public string? CustomerId { get; set; }

        /// <summary>
        /// 订单日期（不可为空）
        /// </summary>
        public DateTime OrderDate { get; set; }

        /// <summary>
        /// 交货日期/预计交货时间
        /// </summary>
        public DateTime? DeliveryDate { get; set; }

        /// <summary>
        /// 货币类型/币别
        /// </summary>
        public string? Currency { get; set; }

        /// <summary>
        /// 支付方式/结账方式
        /// </summary>
        public string? PaymentMethod { get; set; }

        /// <summary>
        /// 交易类型/业务类型
        /// </summary>
        public string? TransactionType { get; set; }

        /// <summary>
        /// 单据编号/相关凭证号
        /// </summary>
        public string? DocumentNumber { get; set; }

        /// <summary>
        /// 业务员/销售负责人
        /// </summary>
        public string? Salesperson { get; set; }

        /// <summary>
        /// 质量要求/产品规格要求
        /// </summary>
        public string? QualityRequirement { get; set; }

        /// <summary>
        /// 备注/附加说明
        /// </summary>
        public string? Remarks { get; set; }

        /// <summary>
        /// 记录创建时间（数据库默认当前时间）
        /// </summary>
        public DateTime RecordCreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 记录更新时间（数据库默认当前时间）
        /// </summary>
        public DateTime RecordUpdateTime { get; set; } = DateTime.Now;
    }
}
